package com.ruoyi.admin.domain.vo.request.waybill;

import com.ruoyi.admin.domain.entity.WaybillModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.beans.BeanUtils;

import java.math.BigDecimal;


/**
 * 快递添加参数实体
 *
 * @author jianhan
 * @date 2022-12-07 15:41:41
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class WaybillUpdateRequest {


    @ApiModelProperty(value = "主键", required = true)
    private Long id;

    @ApiModelProperty(value = "运单号", required = true)
    private String waybillNumber;

    @ApiModelProperty(value = "类型 1入库 2出库 3退回", required = true)
    private String type;

    @ApiModelProperty(value = "排单id（数组）", required = true)
    private String schedulingIds;

    @ApiModelProperty(value = "退回id（数组）", required = true)
    private String returnIds;

    @ApiModelProperty(value = "运费", required = true)
    private BigDecimal freight;

    @ApiModelProperty(value = "删除标志（0代表存在 1代表删除）", required = true)
    private Boolean delFlag;

    @ApiModelProperty(value = "备注", required = true)
    private String remark;

    /**
     * 获取实体对象
     *
     * @return 对象
     * @author jianhan
     * @date 2022-12-07 15:41:41
     **/
    @ApiModelProperty(hidden = true)
    public WaybillModel getWaybillModel() {
        WaybillModel waybillModel = new WaybillModel();
        BeanUtils.copyProperties(this, waybillModel);
        return waybillModel;
    }

}
